<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    // 数组属性检测
    let arr = [1, 2];
    console.log(arr);
    
    // 只检测当前数组对象
    console.log(arr.hasOwnProperty("length"));

    // 不仅检测自己，还会检测父级，也就是_proto_
    console.log("concat" in arr);

    let a={
        name:'小灰'
    };
    let b={
        url:'www.baidu.com'
    };
    // 设置b对象是a的父级,也即是a._proto_=b
    Object.setPrototypeOf(a,b);
    console.log(a);
    
  </script>
</html>
